Usage: 3dscale_geom [options] -c output color image (RLE) if input is a color image -# enlarge (or shrink : # < 0). | # | < 5 -s # # # # source box (row col #rows #cols) -dc # # of cols in destination file (default = source size) -dr # # of rows in the destination file -df # # of frames in the destination file -d # # [#] # of cols, rows, and frames in dest file -filt %s[%s[%s]] filter name in x and y (default=triangle) "-filt '?'" prints a filter catalog -supp %f[%f[%f]] filter support radius -blur %f[%f[%f]] blur factor: >1 is blurry, <1 is sharp -window %s[%s[%s]] window an IIR filter (default=blackman) -debug # print filter coefficients -xy filter x before y -yx filter y before x -plain disable filter coercion -keep0 keep zeros in xfilter Where %d and # denotes integer, %f denotes float, %s denotes string, and '[' marks optional following args
To run scale_geom, the user specifies the source and destination file using unix stdin and stdout. For example: 3dscale_geom < infile > outfile. The default source box is the entire image, and the default destination box is the source box.
Filters are selected with the -filt option. If given one filter name, -filt will use that filter in both x and y; if given two names, different filters can be used in the two dimensions. The command scale_geom -filt '?' prints the list of filters currently known to scale_geom. That list is:
NAME SUPPORT point 0 box 0.5 triangle 1 quadratic 1.5 cubic 2 catrom 2 mitchell 2 gaussian 1.25 sinc 4 bessel 3.24The option -filt point gives fast pixel replication, -filt triangle (the default) gives bilinear interpolation, which is suitable for most purposes, and -filt mitchell gives slower, very high quality results. The other filters are provided for experimentation. The time required by a filter is proportional to its support.
Most of the filters known to scale_geom are FIR (finite impulse response), with an intrinsic support (width), but some of them (gaussian, sinc, bessel) are IIR (infinite impulse response), and must be truncated at some arbitrary support. This can be done with the -supp option. Again, the defaults are reasonable. The IIR filters can be windowed (brought down to zero) with various window functions listed below:
hanning hamming blackman kaiserThe sinc and bessel filters are blackman-windowed by default. Filters can be scaled artificially to blur or sharpen them with the -blur option.
Jin Guojun - LBL, modified for handling 3D and any type of images. g_jin@lbl.gov